home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Demo for Sound .DLL Routines"
- ClientHeight = 3720
- ClientLeft = 720
- ClientTop = 2895
- ClientWidth = 6000
- Height = 4125
- Left = 660
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 3720
- ScaleWidth = 6000
- Top = 2550
- Width = 6120
- Begin CommandButton Command2
- Caption = "Quit"
- Height = 495
- Left = 2145
- TabIndex = 1
- Top = 3045
- Width = 1695
- End
- Begin CommandButton Command6
- Caption = "spChirp"
- Height = 420
- Left = 4725
- TabIndex = 9
- Top = 1845
- Width = 945
- End
- Begin CommandButton Command5
- Caption = "spNoise"
- Height = 420
- Left = 255
- TabIndex = 8
- Top = 1815
- Width = 945
- End
- Begin PictureBox Picture1
- BorderStyle = 0 'None
- Height = 540
- Left = 2640
- Picture = SPSOUND.FRX:0000
- ScaleHeight = 540
- ScaleWidth = 600
- TabIndex = 4
- Top = 1500
- Width = 600
- End
- Begin CommandButton Command7
- Caption = "spNosound"
- Height = 420
- Left = 4725
- TabIndex = 10
- Top = 1065
- Width = 945
- End
- Begin CommandButton Command4
- Caption = "spSound"
- Height = 420
- Left = 255
- TabIndex = 7
- Top = 1050
- Width = 945
- End
- Begin CommandButton Command1
- Caption = "Demo All"
- Height = 420
- Left = 4725
- TabIndex = 0
- Top = 285
- Width = 945
- End
- Begin CommandButton Command3
- Caption = "spTone"
- Height = 420
- Left = 255
- TabIndex = 6
- Top = 285
- Width = 945
- End
- Begin Label Label3
- Alignment = 2 'Center
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00FFFFFF&
- Height = 330
- Left = 1020
- TabIndex = 5
- Top = 3270
- Width = 4290
- End
- Begin Label Label4
- Alignment = 2 'Center
- Caption = "Submitted July 8th, 1991 By Alfred J. Giordano"
- Height = 435
- Left = 1800
- TabIndex = 11
- Top = 2220
- Width = 2445
- End
- Begin Label Label2
- Alignment = 2 'Center
- Caption = "Adapted from 'C' routines which appeared in the MAY 1990 Issue of Inside Turbo C"
- Height = 750
- Left = 1635
- TabIndex = 3
- Top = 735
- Width = 2775
- End
- Begin Label Label1
- Alignment = 2 'Center
- AutoSize = -1 'True
- Caption = "SpSound"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 18
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 435
- Left = 2100
- TabIndex = 2
- Top = 195
- Width = 1620
- End
- Sub Command1_Click ()
- Call Do_Noise
- End Sub
- Sub Command2_Click ()
- End
- End Sub
- Sub Command3_Click ()
- ' Makes a continuous Tone
- ' 330 = Length (counts) for a 1/2 Cycle
- ' 1000 = Number of Cycles or Duration
- Call spTone(330, 1000)
- Call spTone(440, 1000)
- Call spTone(660, 1000)
- End Sub
- Sub Command4_Click ()
- ' starts a continuous tone
- ' 440 = desired frequency
- ' use spNosound to stop tone.
- Call spSound(440)
- End Sub
- Sub Command5_Click ()
- Static BeenHere
- ' Create a hissing noise or White Noise
- ' 1000000 = Total number of counts to delay.
- If BeenHere Then
- BeenHere = 0
- Call spNoise(1000000)
- Else
- BeenHere = 1
- Call spNoise(10000)
- End If
- End Sub
- Sub Command6_Click ()
- Static BeenHere
- ' Sound Glides Down like a Siren
- ' 220 = Starting Frequency
- ' 440 = Starting Frequency
- ' 10 = Cycles of Each Frequency
- If BeenHere Then
- Call spChirp(220, 440, 10)
- BeenHere = 0
- Else
- Call spChirp(440, 220, 10)
- BeenHere = -1
- End If
- End Sub
- Sub Command7_Click ()
- ' Terminate all Sound Functions
- Call spNosound
- End Sub
- Sub Delay (Ticks)
- For i = 1 To Ticks
- Next i
- End Sub
- Sub Do_Noise ()
- Const Pause = 2000
- ' ------------------------------------------
- ' Demo of (Sp) Sound Functions
- ' ------------------------------------------
- ' Sound Glides Down like a Siren
- ' 220 = Starting Frequency
- ' 440 = Starting Frequency
- ' 10 = Cycles of Each Frequency
- Call Delay(Pause)
- Call spChirp(220, 440, 10)
- ' Makes a continuous Tone
- ' 330 = Length (counts) for a 1/2 Cycle
- ' 1000 = Number of Cycles or Duration
- Call Delay(Pause)
- Call spTone(330, 1000)
- ' Create a hissing noise or White Noise
- ' 1000000 = Total number of counts to delay.
- Call Delay(Pause)
- Call spNoise(1000000)
- Call Delay(Pause)
- Call spTone(110, 1000)
- Call Delay(Pause)
- Call spChirp(1000, 1, 3)
- For i = 0 To 15
- Call spChirp(1, 150, 2)
- Next
- ' starts a continuous tone
- ' 440 = desired frequency
- ' use spNosound to stop tone.
- Call Delay(Pause)
- Call spSound(440)
- Call Delay(Pause)
- Call spChirp(220, 440, 10)
- Call Delay(Pause)
- Call spTone(330, 1000)
- Call Delay(Pause)
- Call spNoise(1000000)
- Call Delay(Pause)
- Call spTone(110, 1000)
- Call Delay(Pause)
- Call spChirp(1000, 1, 3)
- For i = 0 To 15
- Call spChirp(1, 150, 2)
- Next i
- Call spChirp(1, 300, 2)
- ' Terminate all Sound Functions
- Call spNosound
- End Sub
-